package com.wzh.utils;

import java.util.List;

import com.wzh.pojo.Contact;

public class DealUtil {

	public static String[][] spiltNum(List<Contact> contactList) {
		// 0：编号 1：姓名 2：电话 3：地址 4：数据库中的id （共5项）
		String[][] contactInfo = new String[contactList.size()][5];

		for (int i = 0; i < contactList.size(); i++) {
			Contact contact = contactList.get(i);

			contactInfo[i][0] = String.valueOf(i+1);
			contactInfo[i][1] = contact.getName();
			contactInfo[i][2] = contact.getTelephone();
			contactInfo[i][3] = contact.getAddress();
			contactInfo[i][4] = String.valueOf(contact.getId());
		}
		return contactInfo;
	}
}
